﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    public class Employee
    {
        /// <summary>
        /// 数据唯一标识符
        /// </summary>
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }
        /// <summary>
        /// enum:0：领导1：党务人员2：雇员
        /// </summary>
        [Required]
        public Selectionreturnmethod Postion { get; set; }
        
        public enum Selectionreturnmethod
        {
            lingdao,
            dangyuan,
            guanyuan
        } 
        /// <summary>
        /// 姓名
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? Name { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }
        public bool Sex { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? IDNumber { get; set; }
        /// <summary>
        /// 籍贯
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? nativeplace { get; set; }
        /// <summary>
        /// 薪资
        /// </summary>
        [Required]
        public float Salary { get; set; }
        /// <summary>
        /// 参加工作日期
        /// </summary>
        [Required]
        public DateTime WorkingDate { get; set; }
        /// <summary>
        /// 注册时间
        /// </summary>
        [Required]
        public DateTime AddTime { get; set; }
    }
}
